<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>街道</title>
<link href="/css/base.css" type="text/css" rel="stylesheet" />
<link href="/css/manage.css" type="text/css" rel="stylesheet" />
<link href="/css/layout.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery.default.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<script type="text/javascript" src="/js/xiaodian.js"></script>
<!--[if ie]><link href="/css/ie.css" type="text/css" rel="stylesheet"><![endif]-->
<style>
.face_box li {
margin: 0 8px 0 0;
}
</style>
<script type="text/javascript">
$(function(){
	$.defaults.lbShow({
		picUL:"picUL",
		titleUL:"titleUL",
		numsUL:"sPicUL",
		styles:"hover",
		time:4000 
	});
	
})

</script>

</head>

<body>
   <?php $this->load->view('head');?>
    <div class="w100p mb20 mt40">
    	<div class="w903 mg clearfix">
        	<div class="layout_left">
            	<!-- road -->
            	<div class="box_s5 mb15">
                	<div class="b_head"></div>
                    <div class="content">
                    	<div class="lb_box">
                        	<ul class="lunbo" id="picUL">
                        		<?php foreach ($lunboList as $key=>$adv):?>
                        			<li <?php if($key == 0):?>class="current"<?php endif;?>>
	                                	<a href="<?php echo $adv['link']?>" target="_blank"><img src="<?php echo site_url($adv['image'])?>" width="571" height="330" class="block" /></a>
	                                </li>	
                        		<?php endforeach;?>
                            </ul>
                            <ul class="lb_nums" id="sPicUL">
                            	<?php foreach ($lunboList as $key=>$adv):?>
                            		<li <?php if($key == 0):?>class="current"<?php endif;?>><a href="#"><?php echo $key+1?></a></li>
                            	<?php endforeach;?>
                            </ul>
                        </div>
                    </div>
                    <div class="b_foot"></div>
                </div>
                <!-- road--end -->
                                
                <!-- installation -->
                <?php foreach ($starstreet as $key=>$street):?>
                	<div class="box_s5 mb15">
	                	<div class="b_head"></div>
	                    <div class="content">
	                    	<div class="com_box">
								<h1><?php echo $street['name']?>上有</h1>
	                            <ul class="install">
	                            	<li><a href="#" class="block"><i class="icon_mark_s1"></i></a></li>
	                                <li><a href="#" class="block"><i class="icon_mark_s2"></i></a></li>
	                                <li><a href="#" class="block"><i class="icon_mark_s3"></i></a></li>
	                                <li><a href="#" class="block"><i class="icon_mark_s4"></i></a></li>
	                            </ul>
	                        </div>
	                        <div class="com_box mt35 mb25">
								<h1 class="espe"><a href="#" class="more fr mr10">more</a><?php echo $street['name']?>上的小店<br class="clear" /></h1>
	                            <ul class=" road_store">
	                            	<?php foreach ($street['storeList'] as $store):?>
	                            		<li>
		                                	<a href="<?php echo site_url('store?id='.$store['id'])?>" class="block"><img src="<?php echo $store['photo']?>" width="82" height="82" class="block" /></a>
		                                    <p class="store_name"><?php echo $store['name']?></p>
		                                </li>
	                            	<?php endforeach;?>
	                            	
	                               
	                            </ul>
	                        </div>
	                    </div>
	                    <div class="b_foot"></div>
	                </div>
                <?php endforeach;?>
                
                <!-- installation--end-->
                
                
                <!-- hot_talk_subject -->
                <div class=" com_box_s1 mb20">
                	<h1><a href="#" class="more fr mr10">more</a>热门街道话题</h1>
                    <ul class="com_list lr_box talk_list">
                    	<?php foreach ($hottopic as $topic):?>
                    		<li>
	                            <div class="l_box"><i class="icon_arrow"></i></div>
	                            <div class="r_box">
	                                <p class="info">                                        	
	                                    <a href="#"><?php echo $topic['title']?></a>
	                                </p>
	                                <div class="else_info mt10">
	                                    <div class="data_nums">
	                                        <a target="_blank" href="<?php echo site_url('replylist/'.$topic['id'].'/5')?>" class="c_reply"><span>回复 [<?php echo $topic['replys']?>]</span></a>
	                                    </div>
	                                    <div>来自：<a href="<?php echo site_url('tamember?id='.$topic['creatid'])?>" class="author"><?php echo $topic['creator']?></a>&nbsp;对<a href="<?php echo site_url('street?id='.$topic['streetid'])?>" class="ml5 mr5"><?php echo $topic['streetname']?></a>的发言<span class="ml10">最后回应：<?php echo date('Y-m-d H:i:s',$topic['createtime'])?></span>  </div>
	                                </div>
	                            </div>
	                            <div class="clear"></div>
	                            <div class="com_comment" style="display:none;">

	                                <div class="main_comment">
	                                    <ul class="face_box">
	                                        <li express="[大笑]"><img src="../../images/others/face_1.png" /></li>
			                                <li express="[惊讶]"><img src="../../images/others/face_2.png" /></li>
			                                <li express="[害羞]"><img src="../../images/others/face_3.png" /></li>
			                                <li express="[哈切]"><img src="../../images/others/face_4.png" /></li>
			                                <li express="[白眼]"><img src="../../images/others/face_5.png" /></li>
			                                <li express="[大哭]"><img src="../../images/others/face_6.png" /></li>
			                                <li express="[偷笑]"><img src="../../images/others/face_7.png" /></li>
			                                <li express="[示爱]"><img src="../../images/others/face_8.png" /></li>
	                                    </ul>
	                                        <table class="com_form issue_comment">
	                                            <tbody>
		                                            <tr>
		                                                <td><textarea class=" def_ta_s5" name="info" style="width: 561px;"></textarea><br class="clear"><div class="validate_v" /></td>
		                                            </tr>
		                                            <tr>
		                                                <td class="tr"><input replyId="<?php echo $topic['id']?>" type="button" value="提交" class="def_btn_s9 mt5 submit reply_comment" /></td>
		                                            </tr>
	                                        	</tbody>
	                                        </table>
	                                </div>
	                            </div>
	                        </li>
                    	
                    	<?php endforeach;?>
                    	
                      
                    </ul>
                </div>
                <!-- hot_talk_subject--end-->
                
                
            </div>
            
            <div class="layout_right">
            	
                <!-- pop_street -->
            	<div class="box_s6 mb15">
                	<div class="b_head"></div>
                    <div class="content">
                    	<div class="com_box_s2">
                        	<h1>本周明星街道</h1>
                            <ul class="pop_street">
                            	<?php foreach ($starstreet as $street):?>
                            		<li>
	                                	<div class="lr_box">
	                                    	<div class="l_box">
	                                        	<a href="<?php echo site_url('street?id='.$street['id'])?>"><img src="<?php echo $street['logo']?>" width="82" height="82" class="block" /></a>
	                                        </div>
	                                        <div class="r_box">
	                                        	<a href="#" class="name"><?php echo $street['name']?></a>
	                                            <p class="area">上海&nbsp;<span class="clrblue"><?php echo $street['areaname']['value']?></span></p>
	                                            <p class="info"><?php echo $street['history']?></p>
	                                            <p>共&nbsp;[<?php echo $street['lives']?>]&nbsp;人入住</p>
	                                        </div>
	                                    </div>
	                                </li>
                            	<?php endforeach;?>
                            	
                            </ul>
                            <a href="###" id="add_street" class="def_btn_s15 add_btn_street">添加街道</a>
                        </div>
                    </div>
                    <div class="b_foot"></div>
                </div>
                <!-- pop_street--end-->
                
                <!-- sorts_check -->
                <div class=" com_box_s1 mb20">
                	<h1><a href="#" class="more fr mr10">更多...</a>分类浏览</h1>
                    <div class="sorts_item">
                    	<h3 class="title">黄浦区</h3>
                        <div class="roads_box">
                        	<?php foreach ($huangpulist as $huangpu):?>
                        		<a href="<?php echo site_url('street?id='.$huangpu['id'])?>"><?php echo $huangpu['name']?></a>
                        	<?php endforeach;?>
                        	<a href="#">more</a><br class="clear" />
                        </div>
                    </div>
                    <div class="sorts_item">
                    	<h3 class="title">卢湾区</h3>
                        <div class="roads_box">
                        	<?php foreach ($luwanlist as $luwan):?>
                        		<a target="_blank" href="<?php echo site_url('street?id='.$luwan['id'])?>"><?php echo $luwan['name']?></a>
                        	<?php endforeach;?>
                        	<a href="#">more</a><br class="clear" />
                        </div>
                    </div>
                    <div class="sorts_item">
                    	<h3 class="title">静安区</h3>
                        <div class="roads_box">
                        	<?php foreach ($jinganlist as $jingan):?>
                        		<a target="_blank" href="<?php echo site_url('street?id='.$jingan['id'])?>"><?php echo $jingan['name']?></a>
                        	<?php endforeach;?>
                        	<a href="#">more</a><br class="clear" />
                        </div>
                    </div>
                    <div class="sorts_item">
                    	<h3 class="title">徐汇区</h3>
                        <div class="roads_box">
                        	<?php foreach ($xuhuilist as $xuhui):?>
                        		<a target="_blank" href="<?php echo site_url('street?id='.$xuhui['id'])?>"><?php echo $xuhui['name']?></a>
                        	<?php endforeach;?>
                        	<a href="#">more</a><br class="clear" />
                        </div>
                    </div>
                    <div class="sorts_item">
                    	<h3 class="title">虹口区</h3>
                        <div class="roads_box">
                        	<?php foreach ($hongkoulist as $hongkou):?>
                        		<a target="_blank" href="<?php echo site_url('street?id='.$hongkou['id'])?>"><?php echo $hongkou['name']?></a>
                        	<?php endforeach;?>
                        	<a href="#">more</a><br class="clear" />
                        </div>
                    </div>
                    <div class="sorts_item">
                    	<h3 class="title">浦东新区</h3>
                        <div class="roads_box">
                        	<?php foreach ($pudonglist as $pudong):?>
                        		<a target="_blank" href="<?php echo site_url('street?id='.$pudong['id'])?>"><?php echo $pudong['name']?></a>
                        	<?php endforeach;?>
                        	<a href="#">more</a><br class="clear" />
                        </div>
                    </div>
                </div>
                <!-- sorts_check--end-->
                
                
                
            </div>
            
        </div>
    </div>
    
   <?php $this->load->view('foot')?>
</body>
<script type="text/javascript">
	$(function(){
		$("#add_street").click(function(){
			if(xiaodian.checkLogin()){
				window.location.href="<?php echo site_url('member/addstreet')?>";
			}else{
				window.location.href="<?php echo site_url('member/tologin')?>?gourl=<?php echo site_url('member/addstreet')?>";
			}
		});
	//	$.defaults.commentReply("<?php echo site_url('member/tologin')?>?gourl=<?php echo site_url('streetmain')?>");
		$(".reply_comment").click(function(){
			
			var content = $(this).parent().parent().parent().find("textarea[name='info']").val();
			if(content == null || content ==''){
				alert('评论不能为空');
				return ;
			}

			$.post("<?php echo site_url('member/replytopic')?>",{
				type:5,
				belongId:$(this).attr('replyId'),
				content:content
			},function(data){
					var ret = $.parseJSON(data);
					if(ret.success == 'true'){
						window.location.reload();
					}else{
						alert(ret.msg);
					}
					
				});
		});
	})
</script>
</html>
